<?php
	require_once '../Tool/Common/PrepareInput.php';

    session_start();
    if (empty($_SESSION["userType"])) {
        $url="../Index.php";
		include_once '../Tool/Common/Redirect.php';
		exit();
    }
    
    $NRIC = "";
    $flag=0;
    if(isset($_REQUEST['NRIC'])) { 
        $NRIC=prepareInput($_REQUEST['NRIC']); 
    }
    
    if(preg_match("/^[ST][0-9]{7}[JZIHGFEDCBA]$/",$NRIC)||preg_match('/^[FG][0-9]{7}[XWUTRQPNMLK]$/', $NRIC)){
		$flag=1;
	}
    echo $flag;
?>